
     @include('common.header')
        <div class="content col-xs-12 col-sm-10">
                        <div class="banner">
                            <p class="fl">合同管理</a> </p>
                            <p class="fr"><a href="/contract/create">增加</a> </p>
                        </div>
                  
                        <div class="table">
                            <table>
                                <thead>
                                    <tr>
                                        <td width="9%">姓名</td>
                                        <td width="9%">编号</td>
                                        <td>起始时间</td>
                                        <td>年限</td>
                                        <td>合同额</td>
                                        <td>备注</td>
                                        <td>修改</td>
                                        <td>删除</td>
                                    </tr>
                                </thead>
                                <tbody>
                            @php
                            $area_total = 0;
                            $price_total = 0;
                            
                            @endphp
                 
                            @foreach ($contracts as $contract)
                            <tr>
                                        <td>{{ $contract->name }}</td>
                                        <td>{{ $contract->code }}</td>
                                        <td>{{$contract->start_date}}
                                        </td>
                                        <td>{{ $contract->peroid }}</td>
                                        <td>{{ $contract->amount }}</td>
                                        <td>{{ $contract->comment }}</td>
                                        <td><a href="/land/showByContract/{{$contract->id}}">土地</a></td>
                                        <td><a href="/contract/modify/{{$contract->id}}">修改</a></td>
                                        <td><a href="/contract/delete/{{$contract->id}}">删除</a></td>
                                      </tr>

                                       @php
                                        $price_total += $contract->amount;
                                      @endphp
                             @endforeach         
                       
                              <tr> <td colspan="9" align="left"><span class="blue">
                              <!-- 总亩数：<span class="green">{{$area_total}}亩</span>  -->
                              总金额：<span class="green">{{$price_total}}元</span></span</td>
                            </tr>       
                              
                          </tbody>
                                
                            </table>
                        </div>
                    
                   <!--  <div class="page">
              <div class="big first fl">首页</div>
              <div class="big fl">←</div>
              <div class="num cur fl">1</div>
              <div class="num fl">2</div>
              <div class="num fl">3</div>
              <div class="num fl">4</div>
              <div class="num fl">5</div>
              <div class="big fl">→</div>
              <div class="big last fl">末页</div>
            </div> -->
                </div>
        
        <script type="text/javascript">
    
        $("table tbody tr:even").css("backgroundColor","#FFF");
        $("table tbody tr:odd").css("backgroundColor","#EBF9FF");
        
        </script>

   @include('common.footer')
  
